Generally, printers are classified as serial printers and page printers. A serial printer prints line by line, and included in this category are dot printers, thermal printers, ink jet printers and the like. A page printer prints page by page, and included in this category are laser printers.
The methods for driving the serial printer carriage are classified as two types. One type is to adopt the carriage drive basic unit per step drive as the criterion, while the other type is to adopt the head drive basic unit. In the case of a 24-pin printer, the carriage drive basic unit is 1/120 inches, while the head drive basic unit is 1/360 inches.
FIG. 1 is a block diagram showing the constitution of the usual serial printer. Referring to this drawing, a central processing unit (hereinafter termed "CPU") controls the overall operations of the printer, and contains a 16-bit counter by which the carriage drive time is decided. Further, the CPU stores a ROM memory device which can be externally provided in an alternative form.
A decoding circuit 10 connected to the CPU, controls the drive of a carriage drive section 20 or a head drive section 30 under the supervision of the CPU. That is, the decoding circuit 10 drives either the carriage drive section 20 or the head drive section 30.
Data buses which extend from the CPU are connected to the carriage drive section 20 and the head drive section 30, both of which receive various control data through the data buses.
If the carriage drive section 20 is selected by the decoding circuit 10 under the control of the CPU, it drives a carriage motor which is a step motor. If the head drive section 30 is selected by the decoding circuit 10 under the control of the CPU, it drives the head.
The conventional drive manner for the carriage and the head as described above judges the carriage drive time by means of a 16-bit counter which is installed within the CPU. If the relevant counting value corresponds to the carriage time table value, the CPU issues an interrupt. In such a case, the carriage is driven in accordance with the drive flow chart.
The carriage time table stored into the ROM within the CPU contains the drive values of the carriage motor such as time and distance.
The carriage drive flow chart is illustrated in FIG. 2, in which the carriage drive is carried out based on the head drive basic unit, and this method will be described below.
At first step S1, a judgment is made as to whether the carriage drive has forward direction. If it is judged that it has a forward direction, the head fire position is increased by 1, while if the carriage drive has a reverse direction, the head fire position is decreased by 1 (steps S2 and S3). The head fire position means that the position of the head lies at the printing position, and also that, in FIG. 3, the head moves from a font point A to a font point B. That is, the head moves from one font to another font, thereby printing a segment of a character.
Then it is determined as to whether it is in the current head fire position, i.e., the position to be printed, and if it is in the head fire position, the head is fired to print a character (steps S4 and S5). After step S5, the carriage count value for counting the movement of the carriage position based on the carriage drive basic unit, is decreased by 1 from the current carriage position count value. Then it is determined as to whether the carriage count value is 0. (steps S6 and S7).
If it is determined that the carriage count value is not 0 at step S7, the system is returned to step S1. If it is determined that the carriage count value is 0, an initial value is assigned to the carriage count value, and then, a determination is made as to whether the carriage is driven in the forward direction (steps S8 and S9). If it is determined that the carriage is driven in the forward direction at step S8, the current carriage position is increased by 1, while if it determined that the carriage is driven in the reverse direction, the current carriage position is decreased by 1 (steps S10 and S11).
After the completion of steps S10 and S11, the carriage is moved by a carriage drive basic unit, and a determination is made as to whether the carriage position lies within the constant speed region. That is, as to whether it lies within the region B in FIG. 4 (steps S12 and S13). If it is determined that the carriage position does not lie within the constant speed region at step S13, the carriage pointer is upgraded on the carriage time table, and then, the carriage count value is upgraded (steps S14 and S15), before returning to step S1. If it is determined that the carriage position lies within the constant speed region, the system is directly returned to step S1. The steps S5, S12, S14 and S15 are subroutine programs, and these are not shown.
The above described flow chart can be summarized as follows. When issuing a carriage interrupt, the CPU upgrades the head fire position, and the firing time is determined when the firing time is reached, the head is driven. Then the carriage position is upgraded, and the carriage count value is decreased by 1. If the value is 0, the carriage is moved by one step. Therefore as long as the carriage count value stays at 0, the interrupts have to be issued repeatedly, thereby lowering the system efficiency.
That is, the carriage drive is carried out based on the head fire basic unit, and therefore, in order to drive the carriage, the system has to be operated n (an integer) times before moving the carriage by 1 step, thereby resulting in lowering of the system efficiency.